#:import Window kivy.core.window.Window
#:set color_shadow [0, 0, 0, .2980392156862745]


<KitchenSinkTextFieldRound@MDTextFieldRound>
    size_hint_x: None
    normal_color: color_shadow
    active_color: color_shadow


<KitchenSinkTextFields>
    name: "textfields"

    BoxLayout:
        orientation: "vertical"
        spacing: "10dp"

        Toolbar:
            id: toolbar

        ScrollView:

            MDBoxLayout:
                orientation: "vertical"
                adaptive_height: True
                padding: dp(48)
                spacing: dp(15)

                KitchenSinkTextFieldRound:
                    hint_text: "Empty field"

                KitchenSinkTextFieldRound:
                    icon_left: "email"
                    hint_text: "Field with left icon"

                KitchenSinkTextFieldRound:
                    icon_left: "key-variant"
                    icon_right: "eye-off"
                    hint_text: "Field with left and right icons"

                MDTextField:
                    hint_text: "Rectangle mode"
                    mode: "rectangle"

                MDTextField:
                    hint_text: "With right icon"
                    mode: "rectangle"
                    fill_color: 0, 0, 0, .4
                    icon_right: "arrow-down-drop-circle-outline"
                    icon_right_color: app.theme_cls.disabled_hint_text_color

                MDTextField:
                    hint_text: "Fill mode"
                    mode: "fill"
                    fill_color: 0, 0, 0, .4

                MDTextField:
                    hint_text: "With right icon"
                    mode: "fill"
                    fill_color: 0, 0, 0, .4
                    icon_right: "arrow-down-drop-circle-outline"

                MDTextField:
                    input_filter: "int"
                    hint_text: "Numeric field"

                MDTextField:
                    hint_text: "No helper text"

                MDTextField:
                    hint_text: "With right icon"
                    icon_right: "arrow-down-drop-circle-outline"
                    icon_right_color: app.theme_cls.disabled_hint_text_color

                MDTextField:
                    hint_text: "Helper text on focus"
                    helper_text: "This will disappear when you click off"
                    helper_text_mode: "on_focus"

                MDTextField:
                	hint_text: "line_anim = False"
                	line_anim: False                    

                MDTextField:
                    hint_text: "Persistent helper text"
                    helper_text: "Text is always here"
                    helper_text_mode: "persistent"

                Widget:
                    size_hint_y: None
                    height: "5dp"

                MDTextField:
                    id: text_field_error
                    hint_text: "Helper text on error (press `Enter`)"
                    helper_text: "Two is my least favorite number"
                    helper_text_mode: "on_error"

                MDTextField:
                    hint_text: "Max text length = 10"
                    max_text_length: 10

                MDTextField:
                    hint_text: "required = True"
                    required: True
                    helper_text_mode: "on_error"

                MDTextField:
                    multiline: True
                    hint_text: "Multi-line text"
                    helper_text: "Messages are also supported here"
                    helper_text_mode: "persistent"

                MDTextField:
                    hint_text: "color_mode = \'accent\'"
                    color_mode: "accent"

                MDTextField:
                    hint_text: "color_mode = \'custom\'"
                    color_mode: "custom"
                    helper_text_mode: "on_focus"
                    helper_text: "Color is defined by \'line_color_focus\' property"
                    line_color_focus: self.theme_cls.opposite_bg_normal

                MDTextField:
                    hint_text: "disabled = True"
                    disabled: True

                MDTextFieldRect:
                    size_hint: None, None
                    size: Window.width - dp(40), "30dp"
                    pos_hint: {"center_y": .5, "center_x": .5}

                MDTextFieldRect:
                	hint_text: "line_anim = False"
                	line_anim: False
                    size_hint: None, None
                    size: Window.width - dp(40), "30dp"
                    pos_hint: {"center_y": .5, "center_x": .5}
